<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="container"></ul>
    <script>
        let now = Date.now()
        const total = 100000
        let ul = document.getElementById('container')
        for(let i = 0; i < total; i++) {
            let li = document.createElement('li')
            li.innerText = ~~(Math.random() * total)
            ul.appendChild(li)
        }
        console.log(Date.now() - now);
        setTimeout(() => {
            console.log(Date.now() - now);
        })
    </script>
</body>
</html>